﻿using System.Diagnostics;
using System;
using FlickrXplorer.Web.ViewData;

namespace FlickrXplorer.Web.ViewData
{
  /// <summary>
  /// Holds information about related photographs.
  /// </summary>
  /// <value>
  /// This is mainly used to hold information used to render the
  /// sidebar in Flickr Xplorer.
  /// </value>                                                  
  public class PhotoData
  {
    private PhotoCollection _photos;

    /// <summary>
    /// Gets or sets the <see cref="FlickrXplorer.Web.ViewData.PhotoCollection" text="PhotoCollection" />
    /// of related photos.
    /// </summary>                                                                                      
    public PhotoCollection Photos
    {
      get
      {
        if (_photos == null)
          _photos = new PhotoCollection();

        return _photos;
      }
      set
      {
        _photos = value;
      }
    }
    /// <summary>
    /// Gets or sets whether to show or hide the <see cref="Pager" text="Pager" />.
    /// </summary>                                                                                           
    public bool ShowPager { get; set; }
    /// <summary>
    /// Gets or sets the <see cref="ViewData.People" text="user information" />
    /// object.
    /// </summary>                                                                              
    public People People { get; set; }
    /// <summary>
    /// Gets or sets the total number of <see cref="FlickrXplorer.Web.ViewData.Photo" text="Photos" />.
    /// </summary>                                                                                    
    public int Total { get; set; }
  }
}
